﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using Lavka.Models;

namespace Lavka.Core
{
    public class ArticlesHelper
    {
        public static List<Articles> GetArticles(LavkaDbEntities context)
        {
            return context.Articles.ToList();
        }
        public static List<Articles> GetRandomArticles(LavkaDbEntities context)
        {
            return context.Articles.OrderBy(p => Guid.NewGuid()).Take(5).ToList();
        }
    }
}